package com.taoyi.mhouse.adapter;

import com.taoy.recyclebinder.EnumMapBindAdapter;

/**
 * Created by tempo on 2015/11/13.
 */
public class AnimeHomeAdapter extends EnumMapBindAdapter<AnimeHomeAdapter.ViewType> {
    public enum ViewType {
        SEARCH, BANNER, ENTRY, SIX_ANIME, TWO_ANIME
    }

    @Override
    public ViewType getEnumFromPosition(int position) {
        ViewType viewType;
        switch (position) {
//            case 0:
//                viewType=ViewType.SEARCH;break;
//            case 1:
//                viewType=ViewType.BANNER;break;
//            case 2:
//                viewType=ViewType.ENTRY;break;
//            case 5:
//                viewType=ViewType.TWO_ANIME;break;
//            default:
//                viewType=ViewType.SIX_ANIME;break;
            case 0:
                viewType = ViewType.BANNER;
                break;
            case 1:
                viewType = ViewType.ENTRY;
                break;
            case 4:
                viewType = ViewType.TWO_ANIME;
                break;
            default:
                viewType = ViewType.SIX_ANIME;
                break;
        }
        return viewType;
    }

    @Override
    public ViewType getEnumFromOrdinal(int ordinal) {
        return ViewType.values()[ordinal];
    }


}
